package xyz.bali16.module.team.service;

import com.baomidou.mybatisplus.extension.service.IService;
import xyz.bali16.application.core.model.Result;
import xyz.bali16.module.team.entity.Team;
import xyz.bali16.module.team.model.TeamAddParam;
import xyz.bali16.module.team.model.TeamPageParam;
import xyz.bali16.module.team.model.TeamUpdateParam;
import xyz.bali16.module.team.model.request.TeamJoinRequest;
import xyz.bali16.module.team.model.request.TeamQuitRequest;
import xyz.bali16.module.team.model.vo.TeamUserVO;

import java.text.ParseException;
import java.util.List;



public interface TeamService extends IService<Team> {
    // 传递一个队伍和创建队伍的用户
    Result<String> addTeam(TeamAddParam teamAddParam) throws Exception;

    List<TeamUserVO> listTeams(TeamPageParam teamPageParam, boolean isAdmin);

    Result<Boolean> updateTeam(TeamUpdateParam teamUpdateParam);

    Result<Boolean> joinTeam(TeamJoinRequest teamJoinRequest) throws ParseException;

    Result<Boolean> quitTeam(TeamQuitRequest teamQuitRequest);

    Result<Boolean> deleteTeam(Long id);
}
